package com.hn.shopadmin.controller;

import com.hn.kiss.modules.sys.shopcommon.validdator.IsIdNo;
import com.hn.kiss.modules.sys.shopdb.entity.User;
import com.hn.kiss.modules.sys.shopdb.mapper.UserMapper;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "TestController", value = "测试类")
@RequestMapping("/t")
@RestController
@Validated
public class TestController {

    @Autowired
    UserMapper userMapper;

    @GetMapping("/hello1")
    public String hello(){
        return "hello word!";
    }

    @GetMapping("/hello")
    public List<User> listUser(@IsIdNo String name){
        return userMapper.selectByExample(null);
    }
}
